package com.ouyu.factory.support;

import com.ouyu.factory.config.BeanDefinition;

import java.util.HashMap;
import java.util.Map;

/**
 * @Author: hz21056677
 * @Description:
 * @Date: Created in 17:46 2021/6/3
 */
public class DefaultListableBeanFactory extends AbstractAutoWireCapableBeanFactory implements BeanDefinitionRegistry {
    Map<String, BeanDefinition> beanDefinitionMap = new HashMap<>();
    @Override
    public void registryBeanDefinition(String beanName, BeanDefinition beanDefinition) {
        beanDefinitionMap.put(beanName,beanDefinition);
    }

    @Override
    protected BeanDefinition getBeanDefinition(String beanName) {
        return beanDefinitionMap.get(beanName);
    }
}
